package com.yufubao.framework.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;


/**
 * @ClassName CommonExceptionEnum
 * @Description: 通用异常返回枚举
 * @Author gaojintao
 * @Date 2020/2/12 15:10
 * @Version V1.0
 **/
@AllArgsConstructor
@Getter
public enum CommonExceptionEnum {

    /**
     * 300 - 500 多为 http 常见的错误码
     */
    ERROR(-1, "系统错误"),
    SUCCESS(0, "success"),
    ERROR500(500, "系统错误"),
    SUCESS(200, "操作成功"),
    NOAUTH(401, "未授权"),
    NOT_PERMISSION(403, "没有权限"),
    NOT_FOUND(404, "请求的信息不存在"),
    MEHTOD_NOT_ALLOWED(405, "方法不允许"),
    VALID_EXCEPTION(428, "字段校验异常"),
    NOSERVICE(503, "服务不可用"),
    SYS_BUSY(606, "系统忙稍后再试"),
    ID_GENERATE_ERROR(607, "生成主键失败！"),
    REPEAT_SUBMIT(608, "表单重复提交"),
    DATA_DUPLICATE_INSERT(609, "数据重复插入"),
    SQL_EXCEPTION(610, "sql执行异常"),
    FEIGN_INVOKE_EXCEPTION(619, "feign调用异常"),
    N4_MESSAGE_ERROR(620, "N4返回有错误信息，请查看详情！"),
    HTTP_MESSAGE_ERROR(621, "请求链接错误，请稍后重试，或联系管理员处理！"),
    CHECK_NO(604, "该值不可用，系统中已存在！"),

    DATE_CHANGE_ERROR(609,"操作的数据发生变动"),
    DATE_NOT_DATA(610,"数据不存在"),
    TOKEN_ERROR(611,"token异常"),


    FILE_NOT_FIND_ERROR(700, "文件未找到！"),
    FILE_NOT_MATCH_ERROR(701, "文件类型不匹配！"),
    EXCEL_IS_NULL_ERROR(702, "excel为空！"),
    EXCEL_IMPORT_ERROR(703, "excel导入失败！"),
    EXCEL_EXPORT_ERROR(704, "excel导出失败！"),
    EXCEL_EXPORTANDUPLOAD_ERROR(705, "excel导出上传失败！"),
    NOF_FIND_CLASS_ERROR(706, "未扫描到类信息！"),
    LOAD_IL8N_MESSAGES_ERROR(707, "加载国际信息配置到缓存失败！"),
    MAX_UPLOAD_SIZE_ERROR(708, "文件大小超出限制！"),
    DATA_CHANGE_ERROR(808, "您操作的数据已发生变动！"),
    SQL_INJECT_ERROR(809, "sql注入异常！"),
    RETRY_FEIGN_ERROR(811, "feign 接口 重试调用异常！"),

    NO_CONNECT_WESOCKET_ERROR(900, "没有连接！请先建立连接再推送消息"),
    PARAM_ERROR(-2, "参数错误！"),
    PARAM_REPEAT_ERROR(-3, "参数数据重复！"),
    LIMIT_ERROR(-4, "限流！系统忙请稍后"),
    REDIS_ERROR(-5, "redis 操作异常"),
    NULL_POINTER(-6, "空指针异常！"),


    UNNOW_EXCEPTION(10000, "系统未知异常"),
    VALID_SMS_TIME_EXCEPTION(10002, "验证码获取失败，请稍后再次获取"),
    VALID_REG_USER_EXCEPTION(10003, "已存在%s，用户注册失败"),
    VALID_LOGIN_USER_EXCEPTION(10004, "登录失败，账号或密码错误"),
    VALID_OAUTH2_USER_EXCEPTION(10005, "注册失败，网络错误"),
    VALID_WARE_SKU_EXCEPTION(10006, "库存不足异常"),
    PRODUCT_SAVE_EXCEPTION(11000, "商品保存es失败"),
    DODE_ERROR(11007, "验证码错误"),


    WXXCX_LOGIN_CODE_ERROR(3000,"微信小程序登录错误"),





    /*自定义*/
    YJZCGSJ(50000, "您已经在预付宝注册过此营业执照了"),
    SHSQDCJWC(50001, "商户申请单创建完成"),
    CYYZZYJBZCGL(50002, "此营业执照已经在预付宝注册过了"),
    FRRZFSBNWK(50003, "法人认证方式不能为空"),
    SJHGSCW(50004, "手机号格式错误"),
    YHKHGSCW(50005, "银行卡号格式错误"),
    YYZZTPLJDZCW(50006, "营业执照图片路径地址错误"),
    SHMLTPLJDZCW(50007, "商户门脸图片路径地址错误"),
    ES_ERROR(50008, "es内部错误: {}"),
    ZHYCZ(50009, "账号名已存在，请重新尝试。"),
    MPNAD(50010, "手机号以绑定过其他账号无法再次注册"),
    GLYZCCG(50011, "管理员注册成功"),
    MINIO_ERROR(50012, "文件存储服务错误"),
    DQSHCZSP(50013, "当前商户下还存在商品"),
    XGSB_YMMCW(50014, "修改失败，原密码错误!"),
    XGSB_GSCW(50015, "修改失败，新密码长度必须大于等于8并且同时包含数字和字母!"),
    TCSB_QCS(50016, "退出失败请重试"),
    SCSB_CZZZQYDXJ(50017, "删除失败，存在正在启用的下级！"),
    SCSB_XX_CZQTXJCY(50018, "删除失败，{} 存在其他下级人员！"),
    DLSB_WCZHHYBSC(50019, "登录失败无此账号或已被删除！"),
    DLSB_ZHYBJY(50020, "登录失败账号已被禁用！"),
    XGCDSB(50021, "修改菜单:{} 失败，上级菜单不能选择自己"),
    CZZCDBYXSC(50022, "存在子菜单不允许删除"),
    ZHMYCZ(50023, "账号已存在"),
    SJHYCZ(50024, "手机号已存在"),
    YXYCZ(50025, "邮箱以存在"),
    FZSJDLSLDDSX(50026, "发展市级[{}]代理数量达到上限！"),
    DLDJCW(50027, "代理等级错误！"),
    FZSJDLSLDDSX_(50028, "发展省级[{}]代理数量达到上限！"),
    DLDJFPCW_QCS(50029, "代理等级分配错误，请重试！"),
    XMFSQYYZT_BNSC(50030, "小蜜蜂存在启用状态，不能删除！"),
    NOT_FOUND_HYBSH(50031,"信息不存在或已被审核")



    ;

    private Integer code;
    private String msg;
}
